//precisa colocar length=0 la em cima....

int main(int argc, char *argv[])
{
    tokens = (int *)malloc(sizeof(int) * 1000);
    ++argv, --argc;
    if (argc > 0)
        yyin = fopen(argv[0], "r");
    else
        yyin = stdin;

    while (tokens[length]=yylex())
        length++;

    int z = program();
    printf("Resultado de Z: %d\n",z);
    free(tokens);
}
